<!--
*Author：富行天下团队
 
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Rule/Sellingrules.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/Rule/Sellingrules.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'id',
                    footer: "Foots",
                    cnName: '售卖规则',
                    name: 'Sellingrules',
                    url: "/Sellingrules/",
                    sortName: "id"
                },
                extend: extend,
                editFormFields: {"partiallyVisible":"","leastAdvanceDay":"","isPurchaseLimit":"","idCardRestrictions":"","riskHint":"","isReserve":"","isRealName":"","RealNameType":"","isHint":"","hintChoose":"","creator":"","createID":"","createDate":"","modifier":"","modifyID":"","modifyDate":"","merchantCode":"","merchantName":""},
                editFormOptions: [[{"title":"是否限购","field":"isPurchaseLimit","type":"switch"},
                               {"dataKey":"enable","data":[],"title":"身份证判断限制，1地区 2 年龄 3 性别","field":"idCardRestrictions","type":"select"},
                               {"title":"最少提前几天","field":"leastAdvanceDay","type":"text"},
                               {"dataKey":"enable","data":[],"title":"仅部分可见，1会员 2 黑名单 3 白名单 4生日价","field":"partiallyVisible","type":"select"}],
                              [{"title":"是否实名制","field":"isRealName","type":"switch"},
                               {"dataKey":"enable","data":[],"title":"1预订人实名 2使用人实名 3 人脸收录 4 预订人、使用人实名","field":"RealNameType","type":"select"},
                               {"title":"风险提示","field":"riskHint","type":"text"},
                               {"title":"预约验证","field":"isReserve","type":"switch"}],
                              [{"title":"是否提示","field":"isHint","type":"switch"},
                               {"dataKey":"enable","data":[],"title":"1风险提示 2疫情提示 3 风险、疫情提示","field":"hintChoose","type":"select"}]],
                searchFormFields: {"hintChoose":"","RealNameType":""},
                searchFormOptions: [[{"dataKey":"enable","data":[],"title":"1预订人实名 2使用人实名 3 人脸收录 4 预订人、使用人实名","field":"RealNameType","type":"select"},{"dataKey":"enable","data":[],"title":"1风险提示 2疫情提示 3 风险、疫情提示","field":"hintChoose","type":"select"}]],
                columns: [{field:'id',title:'主键',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'minOrder',title:'最小起订量',type:'int',width:90,hidden:true,align:'left'},
                       {field:'maxOrder',title:'最大起订量',type:'int',width:90,hidden:true,align:'left'},
                       {field:'advancePeriod',title:'提前预定？天',type:'int',width:90,hidden:true,align:'left'},
                       {field:'purchaseLimit',title:'限购单ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'isRealNamePurchase',title:'是否实名购买',type:'int',width:90,hidden:true,align:'left'},
                       {field:'isPreSale',title:'是否预售',type:'int',width:90,hidden:true,align:'left'},
                       {field:'modifier',title:'修改人',type:'string',width:180,hidden:true,align:'left'},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:90,hidden:true,align:'left',sortable:true},
                       {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:90,hidden:true,align:'left',sortable:true},
                       {field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'creator',title:'创建人',type:'string',width:180,hidden:true,align:'left'},
                       {field:'isBlacklist',title:'是否黑名单',type:'int',width:120,hidden:true,align:'left'},
                       {field:'saleName',title:'售卖名称',type:'string',width:120,hidden:true,align:'left'},
                       {field:'riskHint',title:'风险提示',type:'string',width:120,align:'left',sortable:true},
                       {field:'partiallyVisible',title:'仅部分可见，1会员 2 黑名单 3 白名单 4生日价',type:'string',bind:{ key:'enable',data:[]},width:120,align:'left'},
                       {field:'leastAdvanceDay',title:'最少提前几天',type:'int',width:120,align:'left'},
                       {field:'isReserve',title:'预约验证',type:'string',width:120,align:'left'},
                       {field:'isRealName',title:'是否实名制',type:'int',width:120,align:'left'},
                       {field:'isPurchaseLimit',title:'是否限购',type:'int',width:120,align:'left'},
                       {field:'saleCode',title:'售卖编码',type:'string',width:120,align:'left'},
                       {field:'isHint',title:'是否提示',type:'int',width:120,align:'left'},
                       {field:'isAvailable',title:'是否可用',type:'sbyte',width:120,align:'left'},
                       {field:'idCardRestrictions',title:'身份证判断限制，1地区 2 年龄 3 性别',type:'string',bind:{ key:'enable',data:[]},width:120,align:'left'},
                       {field:'hintChoose',title:'1风险提示 2疫情提示 3 风险、疫情提示',type:'int',bind:{ key:'enable',data:[]},width:120,align:'left'},
                       {field:'epidemicHint',title:'疫情提示',type:'string',width:120,align:'left'},
                       {field:'isDelete',title:'是否删除',type:'int',width:120,require:true,align:'left'},
                       {field:'RealNameType',title:'1预订人实名 2使用人实名 3 人脸收录 4 预订人、使用人实名',type:'string',bind:{ key:'enable',data:[]},width:120,align:'left'}],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
